package com.shortchainsystem.model.exception;

public enum CustomCodeEnum {
    // 成功段0
    SUCCESS(200,"操作成功"),
    SERVER_ERROR(501,"服务器内部错误"),
    USER_NOT_EXIST_ERROR(1101,"用户不存在"),
    USER_EXIST_ERROR(1102,"用户已存在"),
    NULL_ERROR(1201,"请不要留空"),
    LOGIN_PASSWORD_ERROR(1202,"登录密码有误"),
    EDIT_ERROR(1203,"操作有误"),
    LINK_EXIST_ERROR(1301, "请不要重复转换该链接"),
    QRCODE_GENERATE_ERROR(1302, "二维码生成有误"),
    LINK_UNAVAILABLE_ERROR(1303, "请选择正确的链接"),
    PARAM_ERROR(1401, "参数错误");

    Integer code;
    String errorMessage;

    CustomCodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
